  /**
   * Generate time : 2012-03-06 12:17:14
   * Version : 1.0.1.V20070717
   */
package com.baosight.sczx.zm.cm.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;
/**
 * ZMCMMaterialtypeReport 
 *  
 */
public class ZMCMMaterialTypeReport extends DaoEPBase {

	private String fdKeyId = " ";		/* 主键*/
	private String fdTypeCode = " "; /* 类别编码 */
	private String fdTypeInnerCode = " "; /* 类别内码 */
	private String fdTypeName = " ";		/* 类别名称*/
	private Long fdTypeLevel = new Long(0);	/* 类别层级*/
	private String fdParentId = " ";		/* 父类编码ID*/
	private String fdParentTypeName = " "; /* 父类名称 */
	private String fdParentTypeCode = " "; /* 父类编码 */
	private String fdParentTypeInnerCode = " "; /* 父类内码 */

	/**
	 * initialize the metadata 
	 */
	public void initMetaData() {
		EiColumn eiColumn;
		
	eiColumn = new EiColumn("fdKeyId");
	eiColumn.setPrimaryKey(true);
	eiColumn.setFieldLength(32);	
	eiColumn.setDescName("主键");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdTypeCode");
	eiColumn.setFieldLength(7);
	eiColumn.setDescName("类别编码");
	eiMetadata.addMeta(eiColumn);

	eiColumn = new EiColumn("fdTypeInnerCode");
	eiColumn.setFieldLength(30);
	eiColumn.setDescName("类别内码");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdTypeName");
	eiColumn.setFieldLength(80);	
	eiColumn.setDescName("类别名称");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdTypeLevel");
	eiColumn.setType("N");
	eiColumn.setScaleLength(0);
	eiColumn.setFieldLength(38);
	eiColumn.setDescName("类别层级");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdParentId");
	eiColumn.setFieldLength(32);	
	eiColumn.setDescName("父类编码ID");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdParentTypeName");
	eiColumn.setFieldLength(80);
	eiColumn.setDescName("父类名称");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdParentTypeCode");
	eiColumn.setFieldLength(4);
	eiColumn.setDescName("父类编码");
	eiMetadata.addMeta(eiColumn);

	eiColumn = new EiColumn("fdParentTypeInnerCode");
	eiColumn.setFieldLength(30);
	eiColumn.setDescName("父类内码");
	eiMetadata.addMeta(eiColumn);

	}
	/**
	 * the constructor
	 */
	public ZMCMMaterialTypeReport() {
		initMetaData();
	}
	
	/**
	 * get the fdKeyId - 主键
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}
	
	/**
	 * set the fdKeyId - 主键
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}
	
	/**
	 * get the fdTypeCode - 类别编码
	 * 
	 * @return the fdTypeCode
	 */
	public String getFdTypeCode() {
		return this.fdTypeCode;
	}

	/**
	 * set the fdTypeCode - 类别编码
	 */
	public void setFdTypeCode(String fdTypeCode) {
		this.fdTypeCode = fdTypeCode;
	}

	/**
	 * get the fdTypeInnerCode - 类别内码
	 * 
	 * @return the fdTypeInnerCode
	 */
	public String getFdTypeInnerCode() {
		return this.fdTypeInnerCode;
	}

	/**
	 * set the fdTypeInnerCode - 类别内码
	 */
	public void setFdTypeInnerCode(String fdTypeInnerCode) {
		this.fdTypeInnerCode = fdTypeInnerCode;
	}
	
	/**
	 * get the fdTypeName - 类别名称
	 * @return the fdTypeName
	 */
	public String getFdTypeName() {
		return this.fdTypeName;
	}
	
	/**
	 * set the fdTypeName - 类别名称
	 */
	public void setFdTypeName(String fdTypeName) {
		this.fdTypeName = fdTypeName;
	}
	
	/**
	 * get the fdTypeLevel - 类别层级
	 * @return the fdTypeLevel
	 */
	public Long getFdTypeLevel() {
		return this.fdTypeLevel;
	}
	
	/**
	 * set the fdTypeLevel - 类别层级
	 */
	public void setFdTypeLevel(Long fdTypeLevel) {
		this.fdTypeLevel = fdTypeLevel;
	}
	
	/**
	 * get the fdParentId - 父类编码ID
	 * @return the fdParentId
	 */
	public String getFdParentId() {
		return this.fdParentId;
	}
	
	/**
	 * set the fdParentId - 父类编码ID
	 */
	public void setFdParentId(String fdParentId) {
		this.fdParentId = fdParentId;
	}
	
	/**
	 * get the fdParenttypeName - 父类Code
	 * 
	 * @return the fdParenttypeName
	 */
	public String getFdParentTypeCode() {
		return this.fdParentTypeCode;
	}

	/**
	 * set the fdParentTypeCode - 父类Code
	 */
	public void setFdParentTypeCode(String fdParentTypeCode) {
		this.fdParentTypeCode = fdParentTypeCode;
	}
	
	/**
	 * get the fdParentTypeName - 父类名称
	 * 
	 * @return the fdParentTypeName
	 */
	public String getFdParentTypeName() {
		return this.fdParentTypeName;
	}

	/**
	 * set the fdParentTypeName - 父类名称
	 */
	public void setFdParentTypeName(String fdParentTypeName) {
		this.fdParentTypeName = fdParentTypeName;
	}

	/**
	 * get the fdParentTypeInnerCode - 父类内码
	 * 
	 * @return the fdParentTypeInnerCode
	 */
	public String getFdParentTypeInnerCode() {
		return this.fdParentTypeInnerCode;
	}

	/**
	 * set the fdParentTypeInnerCode - 父类内码
	 */
	public void setFdParentTypeInnerCode(String fdParentTypeInnerCode) {
		this.fdParentTypeInnerCode = fdParentTypeInnerCode;
	}
	
	/**
	 * get the value from Map
	 */
	public void fromMap(Map map) {
	
		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdTypeName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdTypeName")), fdTypeName));
		setFdTypeLevel(NumberUtils.toLong(StringUtils.toString(map.get("fdTypeLevel")), fdTypeLevel));
		setFdParentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdParentId")), fdParentId));
		setFdParentTypeName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdParentTypeName")), fdParentTypeName));
		setFdTypeCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdTypeCode")), fdTypeCode));
		setFdTypeInnerCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdTypeInnerCode")), fdTypeInnerCode));
		setFdParentTypeCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdParentTypeCode")), fdParentTypeCode));
		setFdParentTypeInnerCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdParentTypeInnerCode")), fdParentTypeInnerCode));
	}
	
	/**
	 * set the value to Map
	 */
	public Map toMap() {
		
		Map map = new HashMap();
			map.put("fdKeyId",StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));	
			map.put("fdTypeName",StringUtils.toString(fdTypeName, eiMetadata.getMeta("fdTypeName")));	
			map.put("fdTypeLevel",StringUtils.toString(fdTypeLevel, eiMetadata.getMeta("fdTypeLevel")));	
			map.put("fdParentId",StringUtils.toString(fdParentId, eiMetadata.getMeta("fdParentId")));	
			map.put("fdTypeCode", StringUtils.toString(fdTypeCode, eiMetadata.getMeta("fdTypeCode")));
			map.put("fdTypeInnerCode", StringUtils.toString(fdTypeInnerCode, eiMetadata.getMeta("fdTypeInnerCode")));
			map.put("fdParentTypeCode", StringUtils.toString(fdParentTypeCode, eiMetadata.getMeta("fdParentTypeCode")));
			map.put("fdParentTypeName", StringUtils.toString(fdParentTypeName, eiMetadata.getMeta("fdParentTypeName")));
			map.put("fdParentTypeInnerCode", StringUtils.toString(fdParentTypeInnerCode, eiMetadata.getMeta("fdParentTypeInnerCode")));
			
		return map;
	
	}
}